<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="/includes/common.jsp" %>

<c:set var="dish" value="${action.dish}"></c:set>

<c:choose>
    <c:when test="${empty dish}">
        Không tìm thấy
    </c:when>
    <c:otherwise>
        <div class="dish-image">
            <c:choose>
                <c:when test="${empty dish.image}">
                    <img src="/images/dishes/no-image.jpg" />
                </c:when>
                <c:otherwise>
                    <img src="/images/dishes/${dish.image}" />
                </c:otherwise>
            </c:choose>
        </div>
        <p>
        ID: <b>${dish.id}</b>
        </p>
        <p>
        Tên: <b>${dish.name}</b> 
        </p>
        <p>
        ${dish.description}
        </p>
    
	    <p>
	    Bạn có chắc muốn xoá món ăn này?
	    </p>
	    <div class="form-actions">
	        <a href="delete?id=${param.id}&confirm=confirmed">Có</a>
	        <a href="list">Không</a>
	    </div>
    </c:otherwise>
</c:choose>